while (true) {
    if (className("android.support.v7.widget.LinearLayoutCompat").exists()) {
        if (textContains(")").id("com.tencent.mm:id/ipt").findOne()) {
            className("android.widget.FrameLayout").id("com.tencent.mm:id/auf").find().each(
                function(obj) {
                    try{
                    if (obj.children().get(1).children().get(0).children().get(1).childCount() == 1) {
                        if (obj.children().get(1).children().get(0).children().get(1).children().length == 1) {
                            obj.click()
                            threads.start(function() {
                                desc("开").findOne().click()
                            })
                            sleep(2000)
                            back()
                        }
                    } else {
                        sleep(1)
                    }}
                    catch(err){
                        sleep(1)
                    }
                }
            )
        }
    }
}